package com.shareach.util;

import org.apache.commons.lang.ArrayUtils;

import com.google.common.primitives.Longs;


public final class ArrayUtil {
	
	private ArrayUtil(){}
	
	public static String cateParentIdsToString(Long... longs) {
		return asString(Globals.CATEGORY_PARENTID_SEP, longs);
	}

	public static String asString(String sep, Long[] longs) {
		if (null == longs) {
			return null;
		}
		return Longs.join(sep, ArrayUtils.toPrimitive(longs));
	}
	
	public static Long[] asArray(Long... longs) {
		return longs;
	}
}
